package com.hanwei.uap.acceptors.api.channel;

import com.hanwei.uap.model.po.Command;
import io.netty.channel.Channel;

/**
 * 设备连接管理
 *
 * @author zhaoam
 * @create 2017-08-07 17:46
 **/
public interface ChannelManager {
    public void add(String deviceId, Channel channel);

    public Channel get(String deviceId);

    public Channel remove(String deviceId);

    public String remove(Channel channel);

    public Channel removeAndClose(String deviceId);

    public int size();

    public boolean sendCommand(Command command) throws Exception;
}
